package com.zr.controller.sys;

import com.github.pagehelper.PageInfo;
import com.zr.service.sys.SysLogService;
import com.zr.utils.AjaxResult;
import com.zr.vo.sys.SysLog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 王红伟
 * 登录日志控制层
 */
@RestController
@RequestMapping("/sys/log")
public class SysLogController {

    @Autowired
    private SysLogService sysLogService;

    /**
     * 条件查询登录日志
     *
     * @param sysLog
     * @return
     */
    @PostMapping("/list")
    public AjaxResult list(@RequestBody SysLog sysLog) {
        PageInfo<SysLog> pageInfo = sysLogService.list(sysLog);
        return AjaxResult.success(200, "查询成功", pageInfo);
    }

}
